package com.learn.springcloud.second.web.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * @auth lwt
 * @data 2022/8/25
 */
@Configuration
@ConditionalOnProperty(prefix = "spring.mvc",name = "useCustMappingHandler",matchIfMissing = true)
public class CustWebMvcRegistrations implements WebMvcRegistrations {
    @Override
    public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
        return new CustRequestMappingHandlerMapping();
    }

}
